package com.sg.dto.biz.app.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc TargetContPlanWorkTimeDto
 * @使用场景
 */
@Data
public class TargetContPlanWorkTimeDto extends BaseDto implements Serializable {

    /**
     * 目标周期规划设置ID
     */
    @NotNull(message = "目标周期规划设置ID不能为空")
    @ApiModelProperty("目标周期规划设置ID")
    private String targetCyclePlanSetId;

    /**
     * 归属被评对象目标周期ID
     */
    @NotNull(message = "归属被评对象目标周期ID不能为空")
    @ApiModelProperty("归属被评对象目标周期ID")
    private String evaObjTargetCycleId;

    /**
     * 目标实际开始时间
     */
    @ApiModelProperty("目标实际开始时间")
    private Date targetActualStartTime;

    /**
     * 目标实际结束时间
     */
    @ApiModelProperty("目标实际结束时间")
    private Date targetActualEndtTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TargetContPlanWorkTimeDto that = (TargetContPlanWorkTimeDto) o;
        return targetCyclePlanSetId == that.targetCyclePlanSetId && evaObjTargetCycleId == that.evaObjTargetCycleId && targetActualStartTime == that.targetActualStartTime && targetActualEndtTime == that.targetActualEndtTime;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), targetCyclePlanSetId, evaObjTargetCycleId, targetActualStartTime, targetActualEndtTime);
    }

}
